package com.imau.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.HashSet;
import java.util.Set;

@TableName("t_role")
@AllArgsConstructor
@NoArgsConstructor
@Data
public class Role extends BaseEntity{


    private static final long serialVersionUID = 594829320797158219L;

    /**
     *角色Id
     */
    @TableId(type =  IdType.ASSIGN_ID)
    private String id;
    /**
     * 角色名
     */
    private String name;
    /**
     * 说明
     */
    private String description;

    /**启用状态 0是禁用，1是启用*/
    private String status;
   // private Set<User> users = new HashSet<User>(0); //角色与用户多对多
   @TableField(exist = false)
   private Set<Permission> permissions = new HashSet<Permission>(0);//角色与模块  多对多
}